Integrand size = 19, antiderivative size = 72 \[ \int (a+a \sin (c+d x)) \tan ^4(c+d x) \, dx=a x-\frac {a \cos (c+d x)}{d}-\frac {2 a \sec (c+d x)}{d}+\frac {a \sec ^3(c+d x)}{3 d}-\frac {a \tan (c+d x)}{d}+\frac {a \tan ^3(c+d x)}{3 d} \]
a*x-a*cos(d*x+c)/d-2*a*sec(d*x+c)/d+1/3*a*sec(d*x+c)^3/d-a*tan(d*x+c)/d+1/ 3*a*tan(d*x+c)^3/d
Time = 0.13 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.12 \[ \int (a+a \sin (c+d x)) \tan ^4(c+d x) \, dx=\frac {a \arctan (\tan (c+d x))}{d}-\frac {a \cos (c+d x)}{d}-\frac {2 a \sec (c+d x)}{d}+\frac {a \sec ^3(c+d x)}{3 d}-\frac {a \tan (c+d x)}{d}+\frac {a \tan ^3(c+d x)}{3 d} \]
(a*ArcTan[Tan[c + d*x]])/d - (a*Cos[c + d*x])/d - (2*a*Sec[c + d*x])/d + ( a*Sec[c + d*x]^3)/(3*d) - (a*Tan[c + d*x])/d + (a*Tan[c + d*x]^3)/(3*d)
Time = 0.26 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {3042, 3189, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \tan ^4(c+d x) (a \sin (c+d x)+a) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \tan (c+d x)^4 (a \sin (c+d x)+a)dx\) |
\(\Big \downarrow \) 3189 |
\(\displaystyle \int \left (a \tan ^4(c+d x)+a \sin (c+d x) \tan ^4(c+d x)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {a \cos (c+d x)}{d}+\frac {a \tan ^3(c+d x)}{3 d}-\frac {a \tan (c+d x)}{d}+\frac {a \sec ^3(c+d x)}{3 d}-\frac {2 a \sec (c+d x)}{d}+a x\) |
a*x - (a*Cos[c + d*x])/d - (2*a*Sec[c + d*x])/d + (a*Sec[c + d*x]^3)/(3*d) - (a*Tan[c + d*x])/d + (a*Tan[c + d*x]^3)/(3*d)
3.1.9.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((g_.)*tan[(e_.) + (f_.)*( x_)])^(p_.), x_Symbol] :> Int[ExpandIntegrand[(g*Tan[e + f*x])^p, (a + b*Si n[e + f*x])^m, x], x] /; FreeQ[{a, b, e, f, g, p}, x] && EqQ[a^2 - b^2, 0] && IGtQ[m, 0]
Time = 1.51 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.36
method | result | size |
derivativedivides | \(\frac {a \left (\frac {\sin ^{6}\left (d x +c \right )}{3 \cos \left (d x +c \right )^{3}}-\frac {\sin ^{6}\left (d x +c \right )}{\cos \left (d x +c \right )}-\left (\frac {8}{3}+\sin ^{4}\left (d x +c \right )+\frac {4 \left (\sin ^{2}\left (d x +c \right )\right )}{3}\right ) \cos \left (d x +c \right )\right )+a \left (\frac {\left (\tan ^{3}\left (d x +c \right )\right )}{3}-\tan \left (d x +c \right )+d x +c \right )}{d}\) | \(98\) |
default | \(\frac {a \left (\frac {\sin ^{6}\left (d x +c \right )}{3 \cos \left (d x +c \right )^{3}}-\frac {\sin ^{6}\left (d x +c \right )}{\cos \left (d x +c \right )}-\left (\frac {8}{3}+\sin ^{4}\left (d x +c \right )+\frac {4 \left (\sin ^{2}\left (d x +c \right )\right )}{3}\right ) \cos \left (d x +c \right )\right )+a \left (\frac {\left (\tan ^{3}\left (d x +c \right )\right )}{3}-\tan \left (d x +c \right )+d x +c \right )}{d}\) | \(98\) |
parts | \(\frac {a \left (\frac {\left (\tan ^{3}\left (d x +c \right )\right )}{3}-\tan \left (d x +c \right )+\arctan \left (\tan \left (d x +c \right )\right )\right )}{d}+\frac {a \left (\frac {\sin ^{6}\left (d x +c \right )}{3 \cos \left (d x +c \right )^{3}}-\frac {\sin ^{6}\left (d x +c \right )}{\cos \left (d x +c \right )}-\left (\frac {8}{3}+\sin ^{4}\left (d x +c \right )+\frac {4 \left (\sin ^{2}\left (d x +c \right )\right )}{3}\right ) \cos \left (d x +c \right )\right )}{d}\) | \(103\) |
risch | \(a x -\frac {a \,{\mathrm e}^{i \left (d x +c \right )}}{2 d}-\frac {a \,{\mathrm e}^{-i \left (d x +c \right )}}{2 d}-\frac {4 \left (-2 i a +a \,{\mathrm e}^{i \left (d x +c \right )}-3 i a \,{\mathrm e}^{2 i \left (d x +c \right )}+3 a \,{\mathrm e}^{3 i \left (d x +c \right )}\right )}{3 \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) \left (-i+{\mathrm e}^{i \left (d x +c \right )}\right )^{3} d}\) | \(109\) |
1/d*(a*(1/3/cos(d*x+c)^3*sin(d*x+c)^6-sin(d*x+c)^6/cos(d*x+c)-(8/3+sin(d*x +c)^4+4/3*sin(d*x+c)^2)*cos(d*x+c))+a*(1/3*tan(d*x+c)^3-tan(d*x+c)+d*x+c))
Time = 0.29 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.22 \[ \int (a+a \sin (c+d x)) \tan ^4(c+d x) \, dx=-\frac {3 \, a d x \cos \left (d x + c\right ) - 7 \, a \cos \left (d x + c\right )^{2} - {\left (3 \, a d x \cos \left (d x + c\right ) - 3 \, a \cos \left (d x + c\right )^{2} - 2 \, a\right )} \sin \left (d x + c\right ) - a}{3 \, {\left (d \cos \left (d x + c\right ) \sin \left (d x + c\right ) - d \cos \left (d x + c\right )\right )}} \]
-1/3*(3*a*d*x*cos(d*x + c) - 7*a*cos(d*x + c)^2 - (3*a*d*x*cos(d*x + c) - 3*a*cos(d*x + c)^2 - 2*a)*sin(d*x + c) - a)/(d*cos(d*x + c)*sin(d*x + c) - d*cos(d*x + c))
\[ \int (a+a \sin (c+d x)) \tan ^4(c+d x) \, dx=a \left (\int \sin {\left (c + d x \right )} \tan ^{4}{\left (c + d x \right )}\, dx + \int \tan ^{4}{\left (c + d x \right )}\, dx\right ) \]
Time = 0.29 (sec) , antiderivative size = 65, normalized size of antiderivative = 0.90 \[ \int (a+a \sin (c+d x)) \tan ^4(c+d x) \, dx=\frac {{\left (\tan \left (d x + c\right )^{3} + 3 \, d x + 3 \, c - 3 \, \tan \left (d x + c\right )\right )} a - a {\left (\frac {6 \, \cos \left (d x + c\right )^{2} - 1}{\cos \left (d x + c\right )^{3}} + 3 \, \cos \left (d x + c\right )\right )}}{3 \, d} \]
1/3*((tan(d*x + c)^3 + 3*d*x + 3*c - 3*tan(d*x + c))*a - a*((6*cos(d*x + c )^2 - 1)/cos(d*x + c)^3 + 3*cos(d*x + c)))/d
Timed out. \[ \int (a+a \sin (c+d x)) \tan ^4(c+d x) \, dx=\text {Timed out} \]
Time = 8.95 (sec) , antiderivative size = 231, normalized size of antiderivative = 3.21 \[ \int (a+a \sin (c+d x)) \tan ^4(c+d x) \, dx=a\,x+\frac {\left (\frac {2\,a\,\left (3\,c+3\,d\,x\right )}{3}-\frac {a\,\left (6\,c+6\,d\,x-6\right )}{3}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (\frac {a\,\left (3\,c+3\,d\,x-12\right )}{3}-\frac {a\,\left (3\,c+3\,d\,x\right )}{3}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\frac {4\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{3}+\left (\frac {a\,\left (3\,c+3\,d\,x\right )}{3}-\frac {a\,\left (3\,c+3\,d\,x-4\right )}{3}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\left (\frac {a\,\left (6\,c+6\,d\,x-26\right )}{3}-\frac {2\,a\,\left (3\,c+3\,d\,x\right )}{3}\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+\frac {a\,\left (3\,c+3\,d\,x\right )}{3}-\frac {a\,\left (3\,c+3\,d\,x-16\right )}{3}}{d\,{\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )}^3\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \]
a*x + ((a*(3*c + 3*d*x))/3 - (a*(3*c + 3*d*x - 16))/3 + tan(c/2 + (d*x)/2) ^2*((a*(3*c + 3*d*x))/3 - (a*(3*c + 3*d*x - 4))/3) - tan(c/2 + (d*x)/2)^4* ((a*(3*c + 3*d*x))/3 - (a*(3*c + 3*d*x - 12))/3) + tan(c/2 + (d*x)/2)^5*(( 2*a*(3*c + 3*d*x))/3 - (a*(6*c + 6*d*x - 6))/3) - tan(c/2 + (d*x)/2)*((2*a *(3*c + 3*d*x))/3 - (a*(6*c + 6*d*x - 26))/3) + (4*a*tan(c/2 + (d*x)/2)^3) /3)/(d*(tan(c/2 + (d*x)/2) - 1)^3*(tan(c/2 + (d*x)/2) + 1)*(tan(c/2 + (d*x )/2)^2 + 1))